import request from '@/utils/request'

/**
 * 查询所有角色
 */
 export const role = (params, page, size) => {
  return request({
    url: `/sys/role/search/${page}/${size}`,
    method: 'POST',
    data: params
  })
}

// 查询角色
export const user = () => {
  return request({
    url: '/sys/user',
  })
}
/**
 * 保存或修改
 */
 export const addrole = (params) => {
  return request({
    url: '/sys/role',
    method: 'POST',
    data: params
  })
}

/**
 * 删除
 */
 export const delerole = (id) => {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE',
  })
}
